<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PlugInList.ascx.cs" Inherits="admin_webparts_Plug_in_PlugInList" %>
<%@ Import Namespace="NTTHAO.Common.BL" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>

<div class="tip">
	<h1><%=LanguageUtility.GetLanguageText("PLUGIN_LIST", Session)%></h1>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
        <td align="left" style="padding-bottom: 10px;">
            <span id="addLink" class="yui-button yui-link-button yuibtn yuibtn-icon btnadd"><span class="first-child"><a href="?type=plug_in&action=add" tabindex="0" id="loggerLink-button"><%=LanguageUtility.GetLanguageText("ADD_NEW", Session)%></a></span></span>
            <script type="text/javascript">
                YAHOO.util.Event.onContentReady("addLink", function () {
                        var oAddLink = new YAHOO.widget.Button("addLink");
                    });
            </script>
        </td>
    </tr>
    <tr>
        <td align="left">
            <table border="1" cellpadding="0" cellspacing="0" class="grid" id="tbGrid">
                <tr>
                    <th width="42px">#</th>
                    <th><%=LanguageUtility.GetLanguageText("NAME", Session)%></th>
                    <th><%=LanguageUtility.GetLanguageText("DESCRIPTION", Session)%></th>
                    <th><%=LanguageUtility.GetLanguageText("PLUGIN_URL_NAME", Session)%></th>
                    <th><%=LanguageUtility.GetLanguageText("INSTALL", Session)%></th>
                    <th><%=LanguageUtility.GetLanguageText("ACTIVE", Session)%></th>
                    <th><%=LanguageUtility.GetLanguageText("LAST_UPDATE", Session)%></th>
                    <th width="42px"><%=LanguageUtility.GetLanguageText("EDIT", Session)%></th>
                </tr>
                <% if (this._PluginList != null) for (int i = 0; i < this._PluginList.Rows.Count; i++)
                   {
                       System.Data.DataRow row = this._PluginList.Rows[i];
                       %>
                <tr class="<%=(i%2==1?"even":"odd") %>">
                    <td align="center"><%=i + 1 %></td>
                    <td><b><%=row[Plugin.NAME__COLUMN_NAME] %></b></td>
                    <td align="left"><%=row[Plugin.DESCRIPTION__COLUMN_NAME]%></td>
                    <td align="center"><%=row[Plugin.PLUGINURLNAME__COLUMN_NAME] %></td>
                    <td align="center"><%=((int)row[Plugin.INSTALLED__COLUMN_NAME] == 1 ? "<img src=\"resources/images/active_l.png\"" : "<img src=\"resources/images/inactive_l.png\"")%></td>
                    <td align="center"><%=((int)row[Plugin.ACTIVED__COLUMN_NAME] == 1 ? "<img src=\"resources/images/active_l.png\"" : "<img src=\"resources/images/inactive_l.png\"")%></td>
                    <td align="center"><%=((DateTime)row[Plugin.LASTUPDATE__COLUMN_NAME]).ToString("yyyy/MM/dd HH:mm")%></td>
                    <td align="center">
                        <ul class="icon" style="width: 28px;">
                            <li><a title="<%=LanguageUtility.GetLanguageText("EDIT", Session)%>" href="?type=plug_in&id=<%=row[Plugin.ID__COLUMN_NAME] %>&action=edit" class="icon editbn">&nbsp</a></li>
                        </ul>
                    </td>
                </tr>
                <%} %>
            </table>
        </td>
    </tr>
</table>